
<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>添加学生</title>
    <link rel="stylesheet" type="text/css" href="layui1/css/layui.css" />
    <style>
    .layui-form-radio>i:hover,
    .layui-form-radioed>i {
        color: #1E9FFF;
    }

    .layui-btn {
        background-color: #1E9FFF;
    }

    .reset {
        background-color: #fff;
    }

    .layui-btn-primary:hover {
        border-color: #1E9FFF;
    }
    </style>
</head>

<body>
    <form class="layui-form" action="index.php" style="width: 500px;margin-top: 30px;" method="POST" target="_parent">
        <div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-block">
                <input type="radio" name="name_on" value="升序(A→Z)" title="升序(A→Z)" onclick="toggleRadio(this)">
                <input type="radio" name="name_up" value="降序(Z→A)" title="降序(Z→A)" onclick="toggleRadio(this)">

            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">学号</label>
            <div class="layui-input-block">
                <input type="radio" name="id_on" value="升序" title="升序">
                <input type="radio" name="id_up" value="降序" title="降序">

            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="radio" name="sex_on" value="男" title="男">
                <input type="radio" name="sex_up" value="女" title="女">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">年龄</label>
            <div class="layui-input-block">
                <input type="radio" name="age_on" value="升序" title="升序">
                <input type="radio" name="age_up" value="降序" title="降序">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号码</label>
            <div class="layui-input-block">
                <input type="radio" name="phone_on" value="升序" title="升序">
                <input type="radio" name="phone_up" value="降序" title="降序">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo1" id="submit" name="sort">排序</button>
                <button type="reset" class="layui-btn layui-btn-primary reset">重置</button>
            </div>
        </div>
    </form>

    <script src="layui1/layui.js"></script>
    <script src="js/verification.js"></script>
    <script src="js/add.js"></script>
    <script>
       
    document.querySelector('input[type="radio"]').addEventListener("change", function() {
    if (this.checked) {
        this.checked = false;
    } else {
        this.checked = true;
    }
});
    </script>
    <!-- <script src="./js/sort.js"></script> -->
</body>

</html>